<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>魔豆素材网</title>
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<link rel="stylesheet" type="text/css" href="css/public.css" />
		<link rel="stylesheet" type="text/css" href="css/person.css" />
		<link rel="stylesheet" type="text/css" href="layui/css/layui.css" />
		<script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<!-- 头部 -->
		<header class="header">
			<div class="header-inner w-m clearfix">
				<div class="logo"><img src="img/logo.png" alt=""></div>
				<ul class="nav clearfix">
					<li><a href="modou.html">首页</a></li>
					<li><a href="tuku.html">原创图库</a></li>
					<li><a href="shouhui.html" class="active">手绘定制</a></li>
				</ul>
				<div class="search" style="margin-left: 50px;">
					<span class="fenlei">分类<img src="img/xiala.png" alt="">
						<ul class="xiala">
							<li>梦幻小说</li>
							<li>都市小说</li>
							<li>男频封面</li>
							<li>素锦封面</li>
							<li>校园封面</li>
							<li>梦幻小说</li>
						</ul>
					</span>
					<span class="text">
						<!-- <span>小说首页<i class="layui-icon layui-icon-close" onclick="close()"></i></span> -->
						<input type="text">
					</span>
					<button class="button"><img src="img/search.png" ></button>
				</div>
				<!-- 已登录 -->
				<div class="user clearfix">
					<img src="img/tx.png" >
					<span>
						张灵灵<br/>
						<font>ID:235342</font>
					</span>
				</div>
				<!-- 未登录 -->
				<div class="reg" style="display: none;">
					<a href="login.html">登录</a> / <a href="reg.html">注册</a>
				</div>
			</div>			
		</header>
		<!-- 内容盒子 -->
		<div style="width: 100%;background:#f8f8f8;">
		<div class="wrap-content">
			<!-- 个人头像和信息 -->
			<div class="person-info-box">
				<!-- 头像 -->
				<div class="tx-box">
					<img class="tx" src="./img/user_tx.png" alt="">
				</div>
				<dl class="nickName">
					<dt>大唐中文网 <img class="vipIcon" src="./img/vip_grande_iocn.png" alt=""></dt>
					<dd>ID：00001</dd>
				</dl>
			</div>
			<!-- 表单内容区域 -->
			<div class="person-form-content">
				<!-- tabs区域 -->
				<ul class="person-tabs">
					<a href="myDown.html"><li>我的下载</li></a>
					<a href="#"><li>我的收藏</li></a>
					<a href="myBuy.html"><li>购买记录</li></a>
					<li class="active last">我的账户</li>
				</ul>
				<!-- 内容区域 -->
				<div class="person-main">
					<form  class="layui-form" action="">
						<!-- item -->
						<div class="person-item tx">
							<div class="label">头像</div>
							<div class="content">
								<div class="img-box">
									<img src="./img/user_tx.png" alt="">
									<!-- layUi 上传元素 -->
									<div  class="uploadFile" id="uploadFile"></div>
								</div>
							</div>
							<div style="clear: both"></div>
						</div>
						<!-- item -->
						<div class="person-item nc">
							<div class="label">昵称</div>
							<div class="content">
								<p>大唐中文网</p>
							</div>
							<div style="clear: both"></div>
						</div>
						<!-- item -->
						<div class="person-item sex">
							<div class="label">性别 <span style="color: #e82633">*</span></div>
							<div class="content">
								<div>
									<input type="radio" name="sex" value="保密" title="保密" checked="">
									<input type="radio" name="sex" value="男" title="男" >
									<input type="radio" name="sex" value="女" title="女">
								</div>
							</div>
							<div style="clear: both"></div>
						</div>
						<!-- item -->
						<div class="person-item">
							<div class="label">年龄</div>
							<div class="content">
								<div style="height:60px;" class="age-box">
									<select name="age" lay-verify="" style="height:60px;">
										<option value="1">1</option>
										<option value="2">2</option>
										<option value="3">3</option>
										<option value="4">4</option>
										<option value="4">5</option>
										<option value="4">6</option>
										<option value="4">7</option>
										<option value="4">8</option>
										<option value="4">9</option>
										<option value="4">10</option>
										<option value="4">11</option>
									</select>     
								</div>
							</div>
							<div style="clear: both"></div>
						</div>
						<!-- item -->
						<div class="person-item">
							<div class="label">地区</div>
							<div class="content">
								<div>
									<input type="text" name="address"   placeholder="请输入您所在的地区" autocomplete="off" class="layui-input">   
								</div>
							</div>
							<div style="clear: both"></div>
						</div>
						<!-- item -->
						<div class="person-item">
							<div class="label">QQ</div>
							<div class="content">
									<div>
										<input type="text" name="qq"   placeholder="请输入您的QQ" autocomplete="off" class="layui-input">   
									</div>
								</div>
							<div style="clear: both"></div>
						</div>
						<!-- item -->
						<div class="person-item">
							<div class="label">邮箱</div>
							<div class="content">
									<div>
										<input type="text" name="email"    placeholder="请输入您的邮箱" autocomplete="off" class="layui-input">   
									</div>
								</div>
							<div style="clear: both"></div>
						</div>
						<!-- item -->
						<div class="person-item">
							<div class="label">手机  <span style="color: #e82633">*</span></div>
							<div class="content">
									<div>
										<input type="text" name="phone" lay-verify="required|phone" required  placeholder="请输入您的手机号码" autocomplete="off" class="layui-input">   
									</div>
								</div>
							<div style="clear: both"></div>
						</div>
						<!-- 保存按钮 -->
						<!-- <div class="save-btn">保存</div> -->
						<button class="layui-btn save-btn" lay-submit lay-filter="formDemo">保存</button>
					</form>
				</div>
			</div>
		</div>
		</div>
		<!-- 底部 -->
		<footer class="footer">
			<ul class="nav">
				<li><a href="">关于我们</a></li>
				<li><a href="">友情链接</a></li>
				<li><a href="">个人会员版</a></li>
				<li><a href="">隐私协议</a></li>
				<li><a href="">服务条款</a></li>
				<li><a href="">联系我们</a></li>
				<li><a href="">加入我们</a></li>
			</ul>
			<p class="flink">
				<a href="">联合推广 market@163.com</a>
				<a href="">友链交换 market@163.com</a>
			</p>
			<p class="ewm"><img src="img/ewm.png"></p>
			<a href="" class="beian">Copyright © 2017 MIUI 京ICP备10046444号 | 京公网安备11010802020134号 | 京ICP证110507号</a>
		</footer>
		<!-- 弹窗 -->
		<div class="tc">
			<div class="innerTc">
				<div class="tcHead">
					<h1>制作封面</h1>
					<p>请认真填写定制单,以便设计师能够准确的了解你的小说情况好量身定制</p>
				</div>
				<div class="tcBottom">
					<div>
						<span>小说名字</span>
						<input type="text">
					</div>
					<div>
						<span>小说作者</span>
						<input type="text">
						<span style="margin:0 29px 0 19px;">QQ</span>
						<input type="text">
					</div>
					<div class="clearfix">
						<span>小说类型</span>
						<ul class="clearfix tcchoose">
							<li class="xstype">玄幻</li>
							<li>奇幻</li>
							<li>武侠</li>
							<li>仙侠</li>
							<li>都市</li>
							<li>言情</li>
							<li>历史</li>
							<li>军事</li>
							<li>竞技</li>
							<li>科幻</li>
							<li>灵异</li>
							<li>同人</li>
							<li>漫画</li>
							<li>二次元</li>
							<li>其他</li>
						</ul>
					</div>
					<div>
						<span>小说地址</span>
						<input type="text">
					</div>
					<div>
						<span>小说简介</span>
						<input type="text">
					</div>
					<p class="tijiao">提交申请</p>
				</div>
			</div>
		</div>
		<!-- 右边侧边栏 -->
		<ul class="right-fix-menu">
				<li>企业<br> VIP</li>
				<li>加入<br> VIP</li>
				<li>QQ<br> 登录</li>
				<li>微信<br> 登录</li>
				<li>客服</li>
				<li class="last">
					<img src="./img/backto-top-arow.png" alt="">
					<span>顶部</span>
				</li>
			</div>
			<!-- 右边侧边栏 end-->
		<script type="text/javascript">
			layui.use(['jquery', 'element', 'rate','layer','form','upload',], function() {
				var form = layui.form;
				var upload = layui.upload;
				var $ = layui.$,
					rate = layui.rate,
					layer = layui.layer,
					element = layui.element;
				
				//监听表单提交
				form.on('submit(formDemo)', function(data){
					layer.msg("提交成功");
					// layer.msg(JSON.stringify(data.field));
					return false;
				});

				// 上传头像
				//执行实例
				var uploadInst = upload.render({
					elem: '#uploadFile' //绑定元素
					,url: '/upload/' //上传接口
					,done: function(res){
						//上传完毕回调
						console.log(res);
					}
					,error: function(){
						//请求异常回调
					}
				});
				// 提交弹窗内容
				$(".tijiao").click(function(event){					
					layer.alert("提交成功！")
					$(".tc").hide();					
				})
				// 阻止冒泡
				$(".innerTc").click(function(event){
					event.stopPropagation();
				})
				// 点击空白处关闭弹窗
				$(".tc").click(function(event){
					event.stopPropagation();
					$(".tc").hide();
				})
				// 筛选
				$(".tcchoose li").click(function(){
					$(this).siblings().removeClass("xstype");
					$(this).addClass("xstype");
				})
				// 搜索框
				$(".xiala li").click(function(){
					$(".text").html('<span>'+$(this).text()+'<i class="layui-icon layui-icon-close"></i></span>');
				})
				// 关闭表单内容
				$(".text").on('click','.layui-icon-close',function(){
					$(".text").html('<input type="text">');
				})
				
				// 获取所搜词
				$(".search .button").click(function(){
					var search=$(".text span").text()||$(".text input").val();
					if(search.length>0){
						console.log(search)
						window.open("search.html")
					}else{
						layer.tips('请输入搜索词', '.text', {tips: [3, '#00cc90'],time:1500, anim: 6});
						return false;
					}
				})
				// 监听页面滚动
				 $(document).scroll(function() {
			        var scroH = $(document).scrollTop();  //滚动高度
					var viewH = $(window).height();  //可见高度 
					var contentH = $(document).height();  //内容高度
			
			        if(scroH >400){  //距离顶部大于100px时
						console.log("xx",scroH)
						$(".right-fix-menu").show();
			        }else{
						$(".right-fix-menu").hide();
					}
	   			 })
				// 回到顶部
				var oScrolltop = document.querySelector('.right-fix-menu li.last');
				oScrolltop.onclick = function() {
					function smoothscroll() {
						var currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
						if (currentScroll > 0) {
							window.requestAnimationFrame(smoothscroll);
							window.scrollTo(0, currentScroll - (currentScroll / 6));
						}
					}
					smoothscroll()
				}
			});
		</script>
	</body>
</html>
